﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Catering.Catering_Page.Mes
{
    public partial class MsgCheck : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string pageType = Request.QueryString["pageType"];
                string id = Request.QueryString["id"];
                string dbTable;
                Catering_Rules.SMS_MsgBLL smsRules = new Catering_Rules.SMS_MsgBLL();
                switch (pageType)
                {
                    case "OutBox":
                        dbTable = "View_Of_OutBox";
                        DataTable dt = smsRules.GetSingleMes(id, dbTable);
                        tdContent.InnerHtml = dt.Rows[0]["cText"].ToString();
                        break;
                    case "InBox":
                        dbTable = "View_Of_InBox";
                        DataRow dr = smsRules.GetSingleMes(id);
                        tdContent.InnerHtml = dr["cText"].ToString();
                        break;
                    default:
                        dbTable = "";
                        break;
                }
                
                
            } 
        }
    }
}